<template>
  <div class="table-case">

    <mytbody :goods='goods'>

      <template #hh>
         <th>编号</th>
          <th>图片</th>
          <th>名称</th>
          <th width="100px">标签</th>
      </template>

      <template #dd={itme}>
        <td>{{itme.id}}</td>
          <td><img :src=itme.picture /></td>
          <td>{{itme.name}}</td>
          <td>
           <mytag v-model="itme.tag"></mytag>
          </td>
      </template>

    </mytbody>

        <mytbody :goods='goods'>

      <template #hh>
         <th>编号</th>
          <th>网址</th>
          <th>名称</th>
          <th width="100px">标签</th>
      </template>

      <template #dd={itme}>
        <td>{{itme.id}}</td>
          <td><a href="http://www.taobao.com">我淘我想要</a></td>
          <td>{{itme.name}}</td>
          <td>
           <mytag v-model="itme.tag"></mytag>
          </td>
      </template>

    </mytbody>


        <mytbody :goods='goods'>

      <template #hh>
         <th>编号</th>
          <th>图片</th>
          <th>名称</th>
          <th width="100px">标签</th>
          <th>编辑</th>
          
      </template>

      <template #dd={itme}>
        <td>{{itme.id}}</td>
          <td><img :src=itme.picture /></td>
          <td>{{itme.name}}</td>
          <td>
           <mytag v-model="itme.tag"></mytag>
          </td>
          <td><button>删除</button><button>添加</button></td>
      </template>

    </mytbody>


  </div>
</template>

<script>
import Mytag from "./components/mytag.vue";
import Mytbody from "./components/mytbody.vue";
export default {
  components: { Mytag, Mytbody },

  data() {
    return {
      tag: "茶具",
      goods: [
        {
          id: 101,
          picture:
            "https://yanxuan-item.nosdn.127.net/f8c37ffa41ab1eb84bff499e1f6acfc7.jpg",
          name: "梨皮朱泥三绝清代小品壶经典款紫砂壶",
          tag: "茶具",
        },
        {
          id: 102,
          picture:
            "https://yanxuan-item.nosdn.127.net/221317c85274a188174352474b859d7b.jpg",
          name: "全防水HABU旋钮牛皮户外徒步鞋山宁泰抗菌",
          tag: "男鞋",
        },
        {
          id: 103,
          picture:
            "https://yanxuan-item.nosdn.127.net/cd4b840751ef4f7505c85004f0bebcb5.png",
          name: "毛茸茸小熊出没，儿童羊羔绒背心73-90cm",
          tag: "儿童服饰",
        },
        {
          id: 104,
          picture:
            "https://yanxuan-item.nosdn.127.net/56eb25a38d7a630e76a608a9360eec6b.jpg",
          name: "基础百搭，儿童套头针织毛衣1-9岁",
          tag: "儿童服饰",
        },
      ],
    };
  },
};
</script>

<style lang="less" scoped>
.table-case {
  width: 1000px;
  margin: 50px auto;
  img {
    width: 100px;
    height: 100px;
    object-fit: contain;
    vertical-align: middle;
  }
}
</style>